#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<assert.h>

void* my_memcpy(void* dest, const void* src, size_t num)
{
	assert(dest != NULL);
	assert(src != NULL);
	char* ret = dest;
	for (int i = 0; i < num; i++)
	{
		*((char*)dest) = *((char*)src);
		((char*)dest)++, ((char*)src)++;
	}
	return ret;
}



int main()
{
	int arr[10] = { 1,2,3,4,3 };
	int brr[3] = { 2,12,3 };
	my_memcpy(arr, brr, sizeof(int) * 1);
	for (int i = 0; i < 5; i++)
	{
		printf("%d ", arr[i]);
	}
	return 0;
}